home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / robo42_a.zip / TESTFILE.BAT < prev    next >
DOS Batch File  |  1992-07-23  |  975b  |  48 lines

  1. ECHO OFF
  2. CLS
  3. REM TESTFILE.BAT - Robocomm file testing batch file
  4. REM %1 = Filename (Including Path)
  5. REM %2 = Type of file (The file's extension)
  6. rd ROBOTEMP
  7. md ROBOTEMP>nul
  8. cd ROBOTEMP
  9. IF EXIST FILE_ID.DIZ DEL FILE_ID.DIZ
  10. IF EXIST DESC.SDI DEL DESC.SDI
  11. IF %2 == ZIP GOTO UNZIP
  12. IF %2 == LZH GOTO UNLZH
  13. IF %2 == ARC GOTO UNARC
  14. IF %2 == ARJ GOTO UNARJ
  15. GOTO ERROR
  16. :UNZIP
  17. PKUNZIP %1
  18. GOTO DONE
  19. :UNARC
  20. PKUNPAK %1
  21. GOTO DONE
  22. :UNLZH
  23. LHA x %1
  24. GOTO DONE
  25. :UNARJ
  26. ARJ e %1
  27. GOTO DONE
  28. :ERROR
  29. CLS
  30. ECHO %1 IS AN UNKNOWN FILE TYPE
  31. ECHO (You may want to edit your TESTFILE.BAT file)
  32. ECHO Parameter 1 was [%1]
  33. ECHO Parameter 2 was [%2]
  34. ECHO  
  35. pause
  36. GOTO END
  37. :DONE
  38. REM Use McAfee's viral scan to test the file for critters
  39. CLS
  40. SCAN *.* /A /nomem
  41. if errorlevel 1 pause
  42. if exist file_id.diz copy file_id.diz %robodir% >nul
  43. if exist desc.sdi copy desc.sdi %robodir% >nul
  44. %COMSPEC%
  45. if exist file_id.diz del file_id.diz
  46. if exist desc.sdi del desc.sdi
  47. :END
  48.